<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/js/jquery-3.6.0.js"></script>
    <script src="/lib/layui/layui.all.js"></script>
<!--    <script src="/js/schedule/update.js"></script>-->
</head>
<body>
<div id="block01">
    <Updateform></Updateform>
</div>

<template id="UpdateForm">
    <form th:action="@{'/ScheduleBlock/updateScheduleData?idR='+${schedule.getId()}}" method="post">
        <table align="center" class="table table-bordered"
               style="border: 1px solid #ebebeb;width:1200px;margin-left: auto;margin-right: auto;margin-top: 30px">
            <tr>
                <td style="font-size: 30px;background-color: #20222A;color: white" align="center" colspan="2"
                    class="lead"><b>事务修改</b></td>
            </tr>
            <tr>
                <td align="center" colspan="2">
                    <div class="input-group mb-3">
                        <div class="input-group-prepend">
                            <span class="input-group-text" id="basic-addon01">标题</span>
                        </div>
                        <input type="text" class="form-control" placeholder="标题" aria-label="标题" name="Title"
                               aria-describedby="basic-addon1" th:value="${schedule.getTitle()}">
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="input-group mb-3">
                        <div class="input-group-prepend">
                            <span class="input-group-text" id="basic-addon02">日期</span>
                        </div>
                        <input type="date" class="form-control" th:value="${schedule.getDate()}" name="date">
                    </div>
                </td>
                <td>
                    <div class="input-group mb-3">
                        <div class="input-group-prepend">
                            <span class="input-group-text">时间</span>
                        </div>
                        <input type="time" class="form-control" th:value="${schedule.getTime()}" name="time">
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="input-group mb-3">
                        <div class="input-group-prepend">
                            <label class="input-group-text">事务类型</label>
                        </div>
                        <select class="custom-select"
                                style="border: 1px solid #d9d9d9;width: 270px" name="type">
                            <option th:each="type:${type}" th:text="${type}" th:selected="${type} eq ${schedule.getType()}"></option>
<!--                            <option  th:text="${schedule.getType()}"></option>-->
                        </select>
                    </div>
                </td>
                <td>
                    <div class="input-group mb-3">
                        <div class="input-group-prepend">
                            <label class="input-group-text" for="inputGroupSelect002">事务联系人</label>
                        </div>
                        <select class="custom-select" id="inputGroupSelect002"
                                style="border: 1px solid #d9d9d9;width: 300px" name="contactName">
                            <option th:each="user:${user}" th:text="${user}" th:selected="${user} eq ${schedule.getContactName()}"></option>
                        </select>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="input-group mb-3">
                        <div class="input-group-prepend">
                            <label class="input-group-text">地点</label>
                        </div>
                        <select class="custom-select" id="inputGroupSelect005"
                                style="border: 1px solid #d9d9d9;width: 300px" name="location">
                            <option th:each="location:${location}" th:text="${location}" th:selected="${location} eq ${schedule.getLocation()}"></option>
<!--                            <option th:if=""></option>-->
                        </select>
                    </div>
                </td>
                <td>
                    <div class="input-group mb-3">
                        <div class="input-group-prepend">
                            <label class="input-group-text">时长</label>
                        </div>
                        <select class="custom-select" id="inputGroupSelect003"
                                style="border: 1px solid #d9d9d9;width: 350px" name="duration">
                            <option th:selected="${schedule.getDuration()} eq 1">1</option>
                            <option th:selected="${schedule.getDuration()} eq 2">2</option>
                            <option th:selected="${schedule.getDuration()} eq 3">3</option>
                            <option th:selected="${schedule.getDuration()} eq 4">4</option>
                        </select>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <div class="input-group mb-3">
                        <div class="input-group-prepend">
                            <span class="input-group-text" id="basic-addon05">内容</span>
                        </div>
                        <br>
                        <br>
                        <textarea type="text" name="topic" style="resize: none;width: 800px;height: 200px"
                                  maxlength="200"
                                  th:placeholder="'内容上限200: '+${schedule.getTopic()}" class="form-control"></textarea>
                    </div>
                </td>
                </td>
            </tr>

            <!--        <input type="hidden" th:attr="'v-bind:value='+${schedule.getId()}">-->
            <!--        th:@click="|updateScheduleData(${schedule.getId()})|"-->

            <tr>
                <td align="center" colspan="2">

                    <input type="submit" value="提交"
                           style="padding-left: 10px;padding-right: 10px;background-color: #3AC2A9FF;"
                           class="btn btn-primary" name="button">
                    <input type="reset" value="重置"
                           style="padding-left: 10px;padding-right: 10px;background-color: #3AC2A9FF;"
                           class="btn btn-primary" name="button">
                    <input type="button" value="返回"
                           style="padding-left: 10px;padding-right: 10px;background-color: #3AC2A9FF;"
                           class="btn btn-primary" name="button">
                </td>
            </tr>
        </table>
    </form>
</template>
</body>
<script src="/js/schedule/vue.js"></script>
<script src="/js/schedule/vue-router.js"></script>
<script src="/js/schedule/axios.min.js"></script>
<link rel="stylesheet" href="/js/schedule/customizedStyle.css">
<link rel="stylesheet" href="/js/schedule/bootstrap.css">
<link rel="stylesheet" href="/js/schedule/tavo-calendar.css">
<!--Vue Path (Start)-->
<script src="/js/schedule/schedule.js"></script>
<!--Vue Path (End)-->
<!--Calendar static doc (Start)-->
<script src="/js/schedule/moment-with-locales.min.js"></script>
<script src="/js/schedule/tavo-calendar.js"></script>
<!--Calendar static doc (End)-->
<script src="/js/schedule/jquery.js"></script>
<script src="/js/schedule/customizedJquery.js"></script>
<script src="/js/schedule/update.js"></script>
</html>